<?php
/* @var $this DefaultController */
$this->breadcrumbs += array(
    'Каталог'=>'/katalog'
);
$this->breadcrumbs += Category::model()->buildParentsArray($model->category);
$this->breadcrumbs[$model->category->title]=array('/subkatalog', 'id'=>$model->category->id);
$this->breadcrumbs[]=$model->title;

$this->setPageTitle($model->title." купить в Светлогорске")
?>

        <h1>
            <?php echo $this->getPageTitle(); ?>
        </h1>


<div class="block">
    <div class="row">

        <?php if ($model->image): ?>
        <div class="col-sm-6">
            <a data-toggle="modal" data-target="#myModal" href="#"><img title="<?php echo $model->title; ?>" alt="<?php echo $model->title; ?>" style='max-height: 250px !important' class="img-thumbnail" src="<?php echo Yii::app()->request->baseUrl."/images/".$model->image; ?>"/></a>
        <?php
        $this->widget('bootstrap.widgets.BsModal', array(
            'id' => 'myModal',
            'htmlOptions' => array('style' => 'text-align: center;'),
            'content' => "<img class='img-thumbnail' src=".Yii::app()->request->baseUrl."/images/".$model->image .">",
        ));
        ?>
        </div>
        <?php endif; ?>
        <div class="col-sm-6" style='text-align: center;'>
        <?php if ($model->is_present): ?>
        <?php echo CHtml::link("Отнести в улей", '#', array('class'=>'knopka-otnesti-v-ulei','submit'=>array("/dobavit_v_korzinu/"), 'params'=>array('id'=>$model->id))); ?>
        <?php else: ?>
			<?php echo CHtml::image(Yii::app()->request->baseUrl.'/images/design/Pchela_net111.png', "", array('height'=>'120px', 'width'=>'88px'));?>
            <div class="is-not-present">К сожалению, сейчас этого товара нет в наличии. Позвоните нам, возможно, мы поможем Вам с выбором.</div>
        <?php endif; ?>
        </div>
    </div>
</div>

<table class="table">
    <?php if ($model->is_present): ?>
    <tr>
        <td>Цена:</td>
        <td><?php echo $model->price ? number_format($model->price, 0, '', ' ') . " бел. руб." : "Цену уточняйте" ?></td>
    </tr>
    <?php endif; ?>
    <tr>
        <td>Брэнд:</td>
        <td><?php echo $model->brand ?></td>
    </tr>
    <tr>
        <td>Характеристики:</td>
        <td><?php echo $model->specs ?></td>
    </tr>
</table>
<?php if ($model->description): ?>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                    Подробнее
                </a>
            </h4>
        </div>
        <div id="collapseOne" class="panel-collapse collapse">
            <div class="panel-body">
               <?php echo $model->description; ?>
            </div>
        </div>
    </div>
<?php endif; ?>

